package com.aiti.lulian.constant;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * description: 小程序版本常量
 * auth fcb
 * date 2025-07-19 10:05
 **/
public class MiniProgramVersionConstant {

    // 1: 普通版
    public static final Integer PU_TONG_VERSION = 1;

    // 2: 高级版
    public static final Integer GAO_JI_VERSION = 2;

    // 3: 超级工厂版
    public static final Integer GONG_CHANG_VERSION = 3;

    // 4: 试用版
    public static final Integer SHI_YONG_VERSION = 4;

    // 5: 拓客版
    public static final Integer TUO_KE_VERSION = 5;

    // 高级版和拓客版
    public static final List<Integer> GaoJiAndTuoKeVersionList = Arrays.asList(GAO_JI_VERSION, TUO_KE_VERSION);

    public static String getCardVersionByEnterpriseVersion(Integer enterpriseVersion) {
        if(enterpriseVersion == null) {
            return null;
        }
        if(enterpriseVersion.equals(PU_TONG_VERSION) || enterpriseVersion.equals(GONG_CHANG_VERSION)) {
            return NewCardBusinessConstant.CARD_VERSION_3;
        }
        if(enterpriseVersion.equals(GAO_JI_VERSION)) {
            return NewCardBusinessConstant.CARD_VERSION_4;
        }
        if(enterpriseVersion.equals(SHI_YONG_VERSION)) {
            return NewCardBusinessConstant.CARD_VERSION_2;
        }
        if(enterpriseVersion.equals(TUO_KE_VERSION)) {
            return NewCardBusinessConstant.CARD_VERSION_5;
        }
        return null;
    }

}
